<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    
    <div class="panel-body">
        <!-- 选项卡导航 -->
        <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active">
                <a href="#project-info" aria-controls="project-info" role="tab" data-toggle="tab">项目信息</a>
            </li>
            <li role="presentation">
                <a href="#booking-details" aria-controls="booking-details" role="tab" data-toggle="tab">预约详情</a>
            </li>
        </ul>
        
        <div id="myTabContent" class="tab-content" style="margin-top: 15px;">
            <!-- 第一个选项卡：项目信息 -->
            <div class="tab-pane fade active in" id="project-info" role="tabpanel">
                <input type="hidden" name="row[id]" value="{$row.id}" class="form-control" data-rule="" data-tip="id"  />

                <div class="form-group">
                    <label for="c-title" class="control-label col-xs-12 col-sm-2">项目名称:</label>
                    <div class="col-xs-12 col-sm-8" id="div-title">
                        <input type="text" id="c-title" name="row[title]" value="{$row.title}" class="form-control" title="title" placeholder="请输入项目名称" data-rule="required" data-tip="项目名称" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-start_time" class="control-label col-xs-12 col-sm-2">活动开始时间:</label>
                    <div class="col-xs-12 col-sm-8" id="div-start_time">
                        <input type="text" id="c-start_time" name="row[start_time]" value="{$row.start_time}" class="form-control datetimepicker" placeholder="请选择活动开始时间" data-rule="required" data-tip="活动开始时间" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-end_time" class="control-label col-xs-12 col-sm-2">活动结束时间:</label>
                    <div class="col-xs-12 col-sm-8" id="div-end_time">
                        <input type="text" id="c-end_time" name="row[end_time]" value="{$row.end_time}" class="form-control datetimepicker" placeholder="请选择活动结束时间" data-rule="required" data-tip="活动结束时间" />
                    </div>
                </div>


                <div class="form-group">
                    <label for="c-intro" class="control-label col-xs-12 col-sm-2">课程介绍:</label>
                    <div class="col-xs-12 col-sm-8" id="div-intro">
                        <textarea name="row[intro]" id="c-intro" class="form-control editor" data-rule="required" rows="5" data-tip="课程介绍" placeholder="请输入课程介绍">{$row.intro}</textarea>
                    </div>
                </div>


                <div class="form-group">
                    <label class="control-label col-xs-12 col-sm-2">是否指定班级:</label>
                    <div class="col-xs-12 col-sm-8" id="div-is_classes">
                        <input id="c-is_classes" name="row[is_classes]" type="hidden" value="{$row.is_classes}">
                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher {if $row.is_classes=='1'}active{else}text-gray{/if}" data-input-id="c-is_classes" data-yes="1" data-no="0">
                            <i class="fa fa-toggle-on fa-2x {if $row.is_classes!='1'}fa-flip-horizontal{/if}"></i>
                        </a>
                        <div data-favisible="switch=1" class="p-3">是</div>
                        <div data-favisible="switch=0" class="p-3">否</div>
                    </div>
                </div>

                <div class="form-group" id="class-items-group" style="display:{if $row.is_classes=='1'}block{else}none{/if};">
                    <label for="c-classes_ids" class="control-label col-xs-12 col-sm-2">指定班级:</label>
                    <div class="col-xs-12 col-sm-8" id="div-classes_ids">
                        <select name="row[classes_ids][]" id="c-classes_ids" class="form-control selects" multiple>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-max_num" class="control-label col-xs-12 col-sm-2">名额:</label>
                    <div class="col-xs-12 col-sm-8" id="div-max_num">
                        <input type="number" id="c-max_num" name="row[max_num]" value="{$row.max_num}" class="form-control" placeholder="请输入名额数量" data-rule="required|digits" data-tip="名额" min="1" />
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-cover" class="control-label col-xs-12 col-sm-2">封面图:</label>
                    <div class="col-xs-12 col-sm-8" id="div-cover">
                        <div class="form-inline">
                            <input id="c-cover" class="form-control" size="38" name="row[cover]" type="text" value="{$row.cover}" data-tip="">
                            <span>
                                <button type="button" id="plupload-cover" class="btn btn-danger plupload" data-input-id="c-cover" data-mimetype="image/*" data-multiple="false" data-preview-id="p-cover">
                                    <i class="fa fa-upload"></i> {:__('Upload')}
                                </button>
                            </span>
                            <span>
                                <button type="button" id="fachoose-cover" class="btn btn-primary fachoose" data-input-id="c-cover" data-mimetype="image/*" data-multiple="false">
                                    <i class="fa fa-list"></i> {:__('Choose')}
                                </button>
                            </span>
                            <ul class="row list-inline plupload-preview" id="p-cover"></ul>
                        </div>
                    </div>
                </div>

                <div class="form-group">
                    <label for="c-status" class="control-label col-xs-12 col-sm-2">状态:</label>
                    <div class="col-xs-12 col-sm-8" id="div-status">
                        <input id="c-status" name="row[status]" type="hidden" value="{$row.status}">
                        <a href="javascript:;" data-toggle="switcher" class="btn-switcher {if $row.status=='1'}active{else}text-gray{/if}" data-input-id="c-status" data-yes="1" data-no="0">
                            <i class="fa fa-toggle-on fa-2x {if $row.status!='1'}fa-flip-horizontal{/if}"></i>
                        </a>
                        <div data-favisible="switch=1" class="p-3">正常</div>
                        <div data-favisible="switch=0" class="p-3">禁用</div>
                    </div>
                </div>

                <div class="form-group layer-footer">
                    <label class="control-label col-xs-12 col-sm-2"></label>
                    <div class="col-xs-12 col-sm-8">
                        <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
                        <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                    </div>
                </div>
            </div>
            
            <!-- 第二个选项卡：预约详情 -->
            <div class="tab-pane fade" id="booking-details" role="tabpanel">
                <div class="row">
                    <div class="col-xs-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4 class="panel-title">预约详情列表</h4>
                                <div class="panel-tools">
                                    <button type="button" class="btn btn-primary btn-sm" id="refresh-booking-list">
                                        <i class="fa fa-refresh"></i> 刷新
                                    </button>
                                </div>
                            </div>
                            <div class="panel-body">
                                <div class="table-responsive">
                                    <table id="booking-details-table" class="table table-striped table-bordered table-hover" width="100%">
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
        </div>
    </div>
</form>